export var tagIndex = 0 //0 , 1 , 2, 3 订单页面切换的索引
// 订单页面 全部，待付款，待核销，已完成 保存的数据
export let tagComp = [[],[],[],[]]
export let tagPage = [1,1,1,1]
export let tagData = ['',0,2,3]

export function getOrderList(tagIndex, successFunc, failFunc) {
	const url = `/api/activity/order/list`
	let data = {p:tagPage[tagIndex], length: 10}
	if (tagIndex != 0) {
		data = {p:tagPage[tagIndex], length: 10, status: tagData[tagIndex]}
	}
	uni.request({
	    url: url, //仅为示例，并非真实接口地址。
		method: 'GET',
	    data: data,
	    success: (res) => {
	        successFunc(res.data)
	    },
		fail: (err) => {
			failFunc(err)
		}
	})
}